package main

import (
	"fmt"
	"gitee.com/dengpju/higo-code/code"
)

type TestCode int64

func (this TestCode) Message(variables ...interface{}) string {
	return code.Get(this, variables...)
}

const (
	None TestCode = iota + 1
	CPU
	VPU
	GPU TestCode = iota + 5
	WWW
)

func (this TestCode) Register() *code.Message {
	return code.Container().
		Put(None, "None1").
		Put(CPU, "CPU1").
		Put(VPU, "VPU1").
		Put(GPU, "GPU1").
		Put(WWW, "WWW")
}

func main() {
	fmt.Println(None, None.Message())
	fmt.Println(code.Container())
	fmt.Println(CPU, CPU.Message())
	fmt.Println(code.New(CPU).Json())
}
